package a.j;

import a.c.d;
import a.c.e;
import a.c.j;
import a.f.cd;

import java.awt.*;
import java.awt.geom.GeneralPath;

public class zf
  extends yf
{
  private float nb = 500.0F;
  protected j ob;
  protected j pb;
  protected qb qb;
  private boolean rb = true;
  private eb sb;
  private static final cd[] tb = { cd.a(1), cd.a(4), cd.a(2), cd.a(8) };
  private static final float ub = 5.0F;
  private static final float vb = 10.0F;
  private static final float wb = 15.0F;
  private static final float[] xb = { -1.666667F, 7.5F, -1.666667F, 0.0F, -5.0F, 0.0F, 0.0F, -7.5F, 5.0F, 0.0F, 1.666667F, 0.0F, 1.666667F, 7.5F };
  private static final float yb = 2.5F;
  private static final float zb = 5.0F;
  private static final float Ab = 7.5F;
  private static final float[] Bb = { 0.0F, 2.5F, 5.0F, 7.5F, 7.5F, 5.0F, 2.5F, 0.0F, 7.5F, -5.0F, 5.0F, -7.5F, 0.0F, -2.5F, -5.0F, -7.5F, -7.5F, -5.0F, -2.5F, 0.0F, -7.5F, 5.0F, -5.0F, 7.5F };
  private boolean Cb = true;
  public static int Db;
  
  public zf(j paramj1, j paramj2)
  {
    a(paramj1);
    b(paramj2);
  }
  
  public zf(df paramdf, j paramj1, j paramj2)
  {
    super(paramdf);
    a(paramj1);
    b(paramj2);
  }
  
  protected void b(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
  {
    boolean bool = ld.E;
    super.b(paramDouble1, paramDouble2, paramDouble3, paramDouble4);
    d locald = null;
    try
    {
      if ((bool) || (this.sb != null))
      {
        cd localcd;
        if (((bool) || (this.ob != null)) && ((bool) || ((a(this.sb)) && ((bool) || (b(this.sb.a(), true))))))
        {
          localcd = a(this.sb, true);
          if (((bool) || (localcd != null)) && (!localcd.equals(this.ob.get(this.sb.a()))))
          {
            this.ob.a(this.sb.a(), localcd);
            locald = this.sb.a();
          }
        }
        if (!bool)
        {
          if (this.pb != null)
          {
            if (bool) {
              break label276;
            }
            if (b(this.sb))
            {
              if (bool) {
                break label276;
              }
              if (b(this.sb.a(), false))
              {
                localcd = a(this.sb, false);
                if (bool) {
                  break label275;
                }
                if ((localcd != null) && (!localcd.equals(this.pb.get(this.sb.a()))))
                {
                  this.pb.a(this.sb.a(), localcd);
                  locald = this.sb.a();
                }
              }
            }
          }
          this.sb = null;
        }
        label275:
        label276:
        if (bool) {
          break label312;
        }
        if (this.qb != null)
        {
          this.i.b(this.qb);
          a(this.qb);
          this.qb = null;
        }
      }
    }
    finally
    {
      label312:
      this.rb = true;
    }
    if (locald != null) {
      b(locald);
    }
  }
  
  protected void b(d paramd) {}
  
  protected void a(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    Object localObject;
    if (!bool2) {
      if (this.rb)
      {
        this.rb = false;
        localObject = k();
        a.c.w localw = ((g)localObject).R();
        fb localfb = ((g)localObject).U();
        if ((bool2) || (!localw.e())) {
          if (!bool2)
          {
            if (localfb.e())
            {
              if (bool2) {
                break label131;
              }
              this.sb = localfb.a();
              localfb.f();
            }
          }
          else
          {
            if (!localfb.e()) {
              break label130;
            }
            if (bool2) {
              break label131;
            }
            this.sb = null;
            if (!bool1) {
              break label130;
            }
          }
        }
        this.sb = null;
        label130:
        label131:
        if (bool2) {
          break label295;
        }
        if (this.sb == null) {
          break label294;
        }
        this.qb = c(this.sb);
        if (!bool2) {
          if (this.qb != null)
          {
            this.i.a(this.qb);
            if (bool2) {
              return;
            }
            if (!bool1) {
              break label294;
            }
          }
        }
        this.sb = null;
        if (bool2) {
          return;
        }
        if (!bool1) {
          break label294;
        }
      }
    }
    if (!bool2) {
      if (this.sb != null)
      {
        localObject = a(this.qb, this.sb);
        if (bool2) {
          return;
        }
        if (localObject != this.qb)
        {
          if (!bool2)
          {
            if (this.qb != null) {
              this.i.b(this.qb);
            }
            this.qb = ((qb)localObject);
            if (bool2) {
              break label295;
            }
          }
          if (this.qb != null) {
            this.i.a(this.qb);
          }
        }
      }
    }
    label294:
    label295:
    super.a(paramDouble1, paramDouble2, paramDouble3, paramDouble4);
  }
  
  protected boolean a(eb parameb)
  {
    return k().t(parameb.a()).b(0) == parameb;
  }
  
  protected boolean b(eb parameb)
  {
    tb localtb = k().t(parameb.a());
    return localtb.b(localtb.n() - 1) == parameb;
  }
  
  protected qb c(eb parameb)
  {
    return a(null, parameb);
  }
  
  protected void a(qb paramqb) {}
  
  protected cd a(eb parameb, boolean paramBoolean)
  {
    boolean bool = ld.E;
    ld localld = k().w(paramBoolean ? parameb.a().e() : parameb.a().f());
    double d1 = Math.max(20.0D, localld.c());
    double d2 = Math.max(20.0D, localld.d());
    double d3 = d1 / d2;
    double d4 = a.d.w.a(localld.A(), localld.B(), parameb.b(), parameb.c());
    if ((bool) || ((d4 < 20.0D) || ((bool) || (localld.f(parameb.b(), parameb.c()))))) {
      return cd.a((byte)0);
    }
    double d5 = (parameb.b() - localld.A()) / d3;
    double d6 = parameb.c() - localld.B();
    if (!bool) {
      if (Math.abs(d5) > Math.abs(d6))
      {
        if (!bool) {
          if (d5 > 0.0D)
          {
            if (!bool) {}
            return cd.a((byte)(parameb.b() - localld.A() - localld.c() * 0.5D < this.nb ? 4 : 0));
          }
        }
        if (!bool) {}
        return cd.a((byte)(localld.A() - localld.c() * 0.5D - parameb.b() < this.nb ? 8 : 0));
      }
    }
    if (!bool) {
      if (d6 > 0.0D)
      {
        if (!bool) {}
        return cd.a((byte)(parameb.c() - localld.B() - localld.d() * 0.5D < this.nb ? 2 : 0));
      }
    }
    if (!bool) {}
    return cd.a((byte)(localld.B() - localld.d() * 0.5D - parameb.c() < this.nb ? 1 : 0));
  }
  
  protected qb a(qb paramqb, eb parameb)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    cd[] arrayOfcd1 = null;
    cd[] arrayOfcd2 = null;
    if ((bool2) || ((a(parameb)) && ((bool2) || (b(parameb.a(), true)))))
    {
      arrayOfcd1 = a(parameb.a(), true);
      localObject1 = a(parameb, true);
      if (((bool2) || (localObject1 != null)) && ((bool2) || (!((cd)localObject1).g())))
      {
        int i = 0;
        int j = 0;
        do
        {
          if (j >= arrayOfcd1.length) {
            break;
          }
          if (bool1) {
            break label144;
          }
          if (arrayOfcd1[j].equals(localObject1))
          {
            i = 1;
            if (!bool2) {
              if (!bool1) {
                break;
              }
            }
          }
          else
          {
            j++;
          }
        } while (!bool1);
        if ((!bool2) && (i == 0))
        {
          label144:
          arrayOfcd2 = new cd[] { localObject1 };
          arrayOfcd1 = null;
        }
        else
        {
          arrayOfcd1 = new cd[] { localObject1 };
        }
      }
    }
    Object localObject1 = null;
    cd[] arrayOfcd3 = null;
    Object localObject2;
    if ((bool2) || ((b(parameb)) && ((bool2) || (b(parameb.a(), false)))))
    {
      localObject1 = a(parameb.a(), false);
      localObject2 = a(parameb, false);
      if (((bool2) || (localObject2 != null)) && ((bool2) || (!((cd)localObject2).g())))
      {
        int k = 0;
        int m = 0;
        do
        {
          if (m >= localObject1.length) {
            break;
          }
          if (bool1) {
            break label311;
          }
          if (localObject1[m].equals(localObject2))
          {
            k = 1;
            if (!bool2) {
              if (!bool1) {
                break;
              }
            }
          }
          else
          {
            m++;
          }
        } while (!bool1);
        if ((!bool2) && (k == 0))
        {
          label311:
          arrayOfcd3 = new cd[] { localObject2 };
          localObject1 = null;
        }
        else
        {
          localObject1 = new cd[] { localObject2 };
        }
      }
    }
    label640:
    if (((!bool2) && (arrayOfcd1 != null)) || ((!bool2) && (localObject1 != null)) || ((bool2) || ((arrayOfcd3 != null) || (arrayOfcd2 != null))))
    {
      localObject2 = new ib();
      d locald = parameb.a();
      e locale = locald.e();
      int n;
      if (!bool2)
      {
        if (arrayOfcd1 != null)
        {
          n = 0;
          do
          {
            if (n >= arrayOfcd1.length) {
              break;
            }
            ((ib)localObject2).a(a(arrayOfcd1[n], locale, locald, true, true));
            n++;
            if ((!bool2) && (bool1)) {
              break label525;
            }
          } while (!bool1);
        }
        if (bool2) {}
      }
      else
      {
        if (arrayOfcd2 != null)
        {
          n = 0;
          do
          {
            if (n >= arrayOfcd2.length) {
              break;
            }
            ((ib)localObject2).a(a(arrayOfcd2[n], locale, locald, true, false));
            n++;
            if ((!bool2) && (bool1)) {
              break label525;
            }
          } while (!bool1);
        }
        if (!bool2) {
          locale = locald.f();
        }
      }
      label525:
      if (!bool2) {
        if (localObject1 != null)
        {
          n = 0;
          do
          {
            if (n >= localObject1.length) {
              break;
            }
            ((ib)localObject2).a(a(localObject1[n], locale, locald, false, true));
            n++;
            if ((!bool2) && (bool1)) {
              break label638;
            }
          } while (!bool1);
        }
      }
      if ((!bool2) && (arrayOfcd3 != null))
      {
        n = 0;
        do
        {
          if (n >= arrayOfcd3.length) {
            break;
          }
          if (bool1) {
            break label640;
          }
          ((ib)localObject2).a(a(arrayOfcd3[n], locale, locald, false, false));
          n++;
        } while (!bool1);
      }
      label638:
      return localObject2;
    }
    return null;
  }
  
  protected cd[] a(d paramd, boolean paramBoolean)
  {
    return tb;
  }
  
  protected qb a(cd paramcd, e parame, d paramd, boolean paramBoolean1, boolean paramBoolean2)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if (((!bool2) && (paramcd == null)) || (paramcd.g())) {
      return null;
    }
    ld localld = k().w(parame);
    GeneralPath localGeneralPath = new GeneralPath(0, 14);
    float f1 = (float)localld.A();
    float f2 = (float)localld.B();
    float f7 = 12.5F;
    if (!bool2) {
      if (!paramBoolean1)
      {
        if (bool2) {
          break label287;
        }
        if (this.Cb) {
          break label283;
        }
      }
    }
    float f3;
    float f4;
    float f5;
    float f6;
    if (!bool2) {
      if (paramcd.c())
      {
        f3 = 1.0F;
        f4 = 0.0F;
        f5 = 0.0F;
        f6 = 1.0F;
        f2 -= (float)localld.d() * 0.5F + f7;
        if (bool2) {
          break label466;
        }
        if (!bool1) {
          break label464;
        }
      }
    }
    if (!bool2) {
      if (paramcd.e())
      {
        f3 = 0.0F;
        f4 = 1.0F;
        f5 = -1.0F;
        f6 = 0.0F;
        f1 += (float)localld.c() * 0.5F + f7;
        if (bool2) {
          break label466;
        }
        if (!bool1) {
          break label464;
        }
      }
    }
    if (paramcd.d())
    {
      f3 = -1.0F;
      f4 = 0.0F;
      f5 = 0.0F;
      f6 = -1.0F;
      f2 += (float)localld.d() * 0.5F + f7;
      if (bool2) {
        break label466;
      }
      if (!bool1) {}
    }
    else
    {
      f3 = 0.0F;
      f4 = -1.0F;
      f5 = 1.0F;
      f6 = 0.0F;
      f1 -= (float)localld.c() * 0.5F + f7;
      if (bool2) {
        break label466;
      }
      if (bool1)
      {
        label283:
        label287:
        if (!bool2) {
          if (paramcd.d())
          {
            f3 = 1.0F;
            f4 = 0.0F;
            f5 = 0.0F;
            f6 = 1.0F;
            f2 += (float)localld.d() * 0.5F + f7;
            if (bool2) {
              break label466;
            }
            if (!bool1) {
              break label464;
            }
          }
        }
        if (!bool2) {
          if (paramcd.f())
          {
            f3 = 0.0F;
            f4 = 1.0F;
            f5 = -1.0F;
            f6 = 0.0F;
            f1 -= (float)localld.c() * 0.5F + f7;
            if (bool2) {
              break label466;
            }
            if (!bool1) {
              break label464;
            }
          }
        }
        if (paramcd.c())
        {
          f3 = -1.0F;
          f4 = 0.0F;
          f5 = 0.0F;
          f6 = -1.0F;
          f2 -= (float)localld.d() * 0.5F + f7;
          if (bool2) {
            break label466;
          }
          if (!bool1) {}
        }
        else
        {
          f3 = 0.0F;
          f4 = -1.0F;
          f5 = 1.0F;
          f6 = 0.0F;
          f1 += (float)localld.c() * 0.5F + f7;
        }
      }
    }
    label464:
    label466:
    float[] arrayOfFloat = paramBoolean2 ? xb : Bb;
    localGeneralPath.moveTo(f1 + arrayOfFloat[0] * f3 + arrayOfFloat[1] * f5, f2 + arrayOfFloat[0] * f4 + arrayOfFloat[1] * f6);
    int i = 2;
    if (i < arrayOfFloat.length) {}
    while (bool2)
    {
      localGeneralPath.lineTo(f1 + arrayOfFloat[i] * f3 + arrayOfFloat[(i + 1)] * f5, f2 + arrayOfFloat[i] * f4 + arrayOfFloat[(i + 1)] * f6);
      i += 2;
      if (bool2) {
        break label611;
      }
      if (bool1) {
        break label609;
      }
      if (!bool1) {
        break;
      }
    }
    localGeneralPath.closePath();
    label609:
    if (paramBoolean2) {
      label611:
      return new me(localGeneralPath, Color.green, Color.black);
    }
    ib localib = new ib();
    localib.a(a(paramcd, parame, paramd, paramBoolean1, true));
    localib.a(new me(localGeneralPath, Color.red, Color.black));
    return localib;
  }
  
  protected boolean b(d paramd, boolean paramBoolean)
  {
    return this.ob != null;
  }
  
  public j J()
  {
    return this.ob;
  }
  
  public void a(j paramj)
  {
    this.ob = paramj;
  }
  
  public j K()
  {
    return this.pb;
  }
  
  public void b(j paramj)
  {
    this.pb = paramj;
  }
  
  public float L()
  {
    return this.nb;
  }
  
  public void a(float paramFloat)
  {
    this.nb = paramFloat;
  }
  
  public boolean M()
  {
    return this.Cb;
  }
  
  public void l(boolean paramBoolean)
  {
    this.Cb = paramBoolean;
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.zf

 * JD-Core Version:    0.7.0.1

 */